package com.annual.system.dto.enterpriseBusiness;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;
import java.math.BigDecimal;

@Data
public class ResEnterpriseBusinessUpdateDto {

    @ApiModelProperty(value = "主键")
    @NotNull(message = "主键不能为空")
    private Long enterpriseBusinessId;

    @ApiModelProperty(value = "主体名称")
    @NotBlank(message="主体名称不能为空")
    private String enterpriseName;

    @ApiModelProperty(value = "信用代码")
    @NotBlank(message="信用代码不能为空")
    private String creditCode;

    @ApiModelProperty(value = "法人姓名")
    @NotBlank(message="法人姓名不能为空")
    private String legalPersonName;

    @ApiModelProperty(value = "身份证号")
    @NotBlank(message="身份证号不能为空")
    @Pattern(regexp = "^[1-9]\\d{5}(18|19|(\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2]\\d)|10|20|30|31)\\d{3}[0-9Xx]$",message = "身份证号格式错误")
    private String idCard;

    @ApiModelProperty(value = "手机号")
    @NotBlank(message="手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$",message = "手机号格式错误")
    private String phone;

    @ApiModelProperty(value = "年营业额")
    @NotNull(message="年营业额不能为空")
    @DecimalMin(value = "1",message = "年营业额最小为1")
    private BigDecimal turnover;

    @ApiModelProperty(value = "纳税额")
    @NotNull(message="纳税额不能为空")
    @DecimalMin(value = "1",message = "纳税额最小为1")
    private BigDecimal ratal;

    @ApiModelProperty(value = "状态（1.待付款 2.已付款 3.已处理 4.已退款 5.已关闭）")
    @NotNull(message="不能为空")
    @Min(value = 1,message = "状态错误")
    @Max(value = 5,message = "状态错误")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;


}
